<!-- START PAGE -->
        <div id="page">
        	
            	<!-- start stats -->
                <div id="stats">
                    <!-- use it up/down on <b> tag for different colors -->                	
                	<div class="column">	<b><?php echo number_format($earn_yesterday); ?></b>	Hôm qua (<?php echo date('d-m-Y', strtotime('-1 day')) ?>)</div>
                    <div class="column">	<b><?php echo number_format($earn_today); ?></b>	<?php echo $str_date; ?></div>
                	<div class="column last">	<b><?php echo number_format($earn_this_month); ?></b>	Tổng tháng <?php echo $month ?></div>
                    <!-- this is last column -->
                	<div class="column last"><b>VND</b></div>
                    <a href="#" title="Close Stats" class="close tips">close</a>
                    <img src="<?php echo $static_url ?>img/icons/mini/stats-arrow-top.png" width="17" height="9" alt="arrow" class="arrow" />
                </div>
                <!-- end stats -->
            	
                
                <!-- start page title -->
                <div class="page-title">
                	<div class="in">
                    		<div class="titlebar">	<h2>REPORT</h2>	<p>Thống kê doanh số sms<?php if($_GET['code'] != '') echo ' theo mã số <strong style="color:red">'.$_GET['code'].'</strong>'; ?></p></div>
                            
                            
                            <div class="clear"></div>
                    </div>
                </div>
                <!-- end page title -->
                <!-- START CONTENT -->
                <div class="content">
					<div class="simplebox grid740" style="z-index: 720;">
						<form action="<?php echo $base_url ?>/website_report/index" method="get" name="form2" id="form2">
						<div class="st-form-line" style="z-index: 520;">
						Chọn tháng:	<input type="text" name="month" style="width:80px;" class="datepicker-input hasDatepicker" id="month">
								<!-- start default date picker -->
								<script type="text/javascript">
								$(function() {
									$( "#month" ).datepicker({
										defaultDate: "+1w",
										changeMonth: true,
										numberOfMonths: 3,
										onSelect: function( selectedDate ) {
											
										}
									});
								});
								</script>
								<!-- end default date picker -->
							<a class="icon-button tips" href="javascript:;" onClick="document.form2.submit()" original-title="Search">
								<img width="18" height="18" alt="icon" src="<?php echo $static_url ?>/img/icons/button/search.png">
							</a>
							<div class="clear" style="z-index: 510;"></div> 
						</div>
						</form>
					</div>
                    <!-- START CHART -->
                        <div class="simplebox grid740">
                        
                        	<div class="titleh"><h3>Biểu đồ tháng <?php echo $m = $_GET['month'] != '' ? $_GET['month'] : date(' | m-Y'); ?></h3>
                            </div>
                            
                            <div class="body">
                            	
                                
                                
                                <!-- start chart -->
                                
        						<div class="chart">
                                <table id="data">
                                	<tfoot>
                                    	<tr>
                                        	<th>1</th>
                                            <th>2</th>
                                            <th>3</th>
                                            <th>4</th>
                                            <th>5</th>
                                            <th>6</th>
                                            <th>7</th>
                                            <th>8</th>
                                            <th>9</th>
                                            <th>10</th>
                                            <th>11</th>
                                            <th>12</th>
                                            <th>13</th>
                                            <th>14</th>
                                            <th>15</th>
                                            <th>16</th>
                                            <th>17</th>
                                            <th>18</th>
                                            <th>19</th>
                                            <th>19</th>
                                            <th>20</th>
                                            <th>22</th>
                                            <th>23</th>
                                            <th>24</th>
                                            <th>25</th>
                                            <th>26</th>
                                            <th>27</th>
                                            <th>28</th>
                                            <th>29</th>
                                            <th>30</th>
                                            <th>31</th>
                                    	</tr>
                                	</tfoot>
                                    
                                    <tbody>
                                    	<tr>
                                        	<tr>
                                        	<?php for($i = 1; $i <= 31; $i++): ?>
											<td>
											<?php
											$m = '-'.$month;// != '' ? '-'.$month : date('-m-Y');
											$tmpDate = str_pad($i, 2, "0", STR_PAD_LEFT).$m;
											if(!empty($month_data)){
												if(array_key_exists($tmpDate, $month_data)){
													echo $month_data[$tmpDate];
												}
												else{
													echo '0';
												}
											}
											else{
												echo '01';
											}
											?>
											</td>
											<?php endfor; ?>
                                    	</tr>
                                    	</tr>
                                    </tbody>
                                </table>
                                <div id="holder"></div>
                                </div>
                                
                                <!-- end chart -->
                            
                            
                            </div>
                            
                        </div>
                        <!-- END CHART -->


                        <div class="clear"></div>
                    </div>
                    <!-- END CONTENT -->
                               
        </div>
        <!-- END PAGE -->